<#assign hashVar = "#">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="${parentPackagePath}.mapper.${voQuery_VoClassName}Mapper">
    <resultMap id="${voQuery_VoClassName}Map" type="${parentPackagePath}.vo.${voQuery_VoClassName}VO">
        <#list fields as field>
        <result column="${field.columnName}" property="${field.columnName}"/>
        </#list>
    </resultMap>

    <select id="getPageList" resultType="${parentPackagePath}.vo.${voQuery_VoClassName}VO">
        ${sql}
        <where>
                <#list fields as field>
                    <if test="query.${field.columnName} != null and query.${field.columnName} != ''">
                                AND ${field.columnName} LIKE CONCAT('%', ${hashVar?string}{query.${field.columnName}}, '%')
                    </if>
                </#list>
        </where>
    </select>
</mapper>